/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   13-4-14 下午3:51 Created by dwzhang
 */
package com.jade.framework.base.criterion;

import java.io.Serializable;

/**
 * Represents an Having operation.
 *
 * @author dwzhang
 * @version 1.0 13-4-14 下午3:51
 */
public class Having implements Serializable
{
    /** Having的条件语句，通常为聚合函数 */
    private final Criterion criterion;

    public Having(Criterion criterion)
    {
        this.criterion = criterion;
    }

    public Criterion getCriterion()
    {
        return criterion;
    }

    @Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("HAVING ");
        sb.append(criterion);
        return sb.toString();
    }
}

